<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="verydows-baseurl" content="<{$common.baseurl}>">
<title>我的订单 - <{$GLOBALS.cfg.site_name}></title>
<link rel="stylesheet" type="text/css" href="<{$common.theme}>/css/general.css" />
<link rel="stylesheet" type="text/css" href="<{$common.theme}>/css/user.css" />
<script type="text/javascript" src="<{$common.baseurl}>/public/script/jquery.js"></script>
<script type="text/javascript" src="<{$common.theme}>/js/general.js"></script>
<script type="text/javascript">
function cancelOrder(e, order_id){
  $(e).vdsConfirm({
    text: '您确定要取消该订单吗?',
    top: -25,
    ok: function(){
      window.location.href = "<{url c='order' a='cancel' id='"+order_id'}>;
    },
  });
}
</script>
</head>
<body>
<!-- 顶部开始 -->
<{layout_topper common=$common}>
<!-- 顶部结束 -->
<!-- 头部开始 -->
<{layout_header common=$common}>
<!-- 头部结束 -->
<div class="loc w1100">
  <div><a href="<{url c='main' a='index'}>">网站首页</a><b>></b><font>我的订单</font></div>
</div>
<!-- 主体开始 -->
<div class="container w1100 mt10">
  <div class="module cut">
    <!-- 左侧开始 -->
    <div class="w180 fl cut">
      <!-- 用户菜单开始 -->
      <{layout_usermenu}>
      <!-- 用户菜单结束 -->
    </div>
    <!-- 左侧结束 -->
    <!-- 右侧开始 -->
    <div class="w910 cut">
      <div class="mcter">
        <h2>我的订单</h2>
        <{if !empty($order_list.rows)}>
        <div class="order cut">
          <{foreach $order_list.rows as $v}>
          <div class="tli cut">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <th colspan="4">
                  <div class="fl aln-l cut">订单号：<b><{$v.order_id}></b><span class="sep"></span>下单日期：<b><{date('Y-m-d', $v.created_date)}></b></div>
                  <div class="fr"><a href="<{url c='order' a='view' id=$v.order_id}>">订单详情</a></div>
                </th>
              </tr>
              <tr>
                <td>
                  <{foreach $v.goods_list as $vv}>
                  <dl>
                    <dt><a href="<{url c='goods' a='index' id=$vv.goods_id}>" target="_blank"><img class="gim" src="<{$common.baseurl}>/upload/goods/prime/50x50/<{$vv.goods_image}>" /></a></dt>
                    <dd>
                      <p><a href="<{url c='goods' a='index' id=$vv.goods_id}>" target="_blank"><{$vv.goods_name}></a></p>
                      <{if !empty($vv.goods_opts)}>
                      <p class="c999 mt5"><{foreach $vv.goods_opts as $o}><span class="mr5">[<{$o.opt_type}>: <font class="c666"><{$o.opt_text}></font>]</span><{/foreach}></p>
                      <{/if}>
                      <p class="mt5"><span class="c999 mr5">单价：</span><font class="cny">¥</font> <{$vv.goods_price}></p>
                      <p class="mt5"><span class="c999 mr5">数量：</span><{$vv.goods_qty}></p>
                    </dd>
                  </dl>
                  <{/foreach}>
                </td>
                <td width="120"><p><font class="cny">¥</font> <{$v.order_amount}></p><p class="mt5 c999">(含运费：<font class="cny">¥</font> <{$v.shipping_amount}>)</p></td>
                <td width="120"><{$payment_map[$v.payment_method]['name']}></td>
                <td width="120">
                  <{if $v.order_status == 1}>
                  <{if $v.payment_method != 2}>
                  <p><a class="sm-red btn" href="<{url c='pay' a='index' order_id=$v.order_id}>">立即付款</a></p>
                  <{/if}>
                  <p class="mt10"><button type="button" class="sm-gray btn" onclick="cancelOrder(this, '<{$v.order_id}>')">取消订单</button></p>
                  <{elseif $v.order_status == 3}>
                  <p><a class="sm-red btn" href="<{url c='order' a='delivered' id=$v.order_id}>">签收</a></p>
                  <{elseif $v.order_status == 4}>
                  <p><a class="sm-blue btn" href="<{url c='review' a='order' order_id=$v.order_id}>">评价</a></p>
                  <p class="mt10"><a class="sm-gray btn" href="<{url c='aftersales' a='order' order_id=$v.order_id}>">售后</a></p>
                  <{elseif $v.order_status == 0}>
                  <p><a class="sm-blue btn" href="<{url c='order' a='rebuy' id=$v.order_id}>">重新购买</a></p>
                  <{else}>
                  <p><a class="sm-blue btn" href="<{url c='order' a='view' id=$v.order_id}>">查看</a></p>
                  <{/if}>
                </td>
              </tr>
            </table>
          </div>
          <{/foreach}>
          <{if !empty($order_list.paging)}>
          <div class="aln-c mt10 pad10 cut"><{layout_paging paging=$order_list.paging class='paging small' c='order' a='list'}></div>
          <{/if}> </div>
        <{else}>
        <div class="pad10 aln-c c999">暂无任何订单记录</div>
        <{/if}>
      </div>
    </div>
    <!-- 右侧结束 -->
  </div>
  <div class="cl"></div>
  <{layout_helper}>
</div>
<!-- 主体结束 -->
<div class="cl"></div>
<!-- 页脚开始 -->
<{layout_footer}>
<!-- 页脚结束 -->
<script type="text/javascript" src="<{$common.baseurl}>/public/script/juicer.js"></script>
</body>
</html>
